<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8"name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="/css/main.css" th:href="@{/css/main.css}" />
    <link rel="stylesheet" href="/css/my.css" th:href="@{/css/my.css}" />
    <link rel="stylesheet" href="/css/alert.css" th:href="@{/css/alert.css}"/>
    <title>admin page</title>
</head>
<body>
<div id="yu_see">
    <form action="#" th:action="@{/admin_see_set}" method="post">
        <table class="mytable">
            <tr >
                <td >名字</td>
                <td >密码</td>
                <td >最大血量</td>
                <td >血量</td>
                <td >攻击</td>
                <td >最大蓝量</td>
                <td >蓝量</td>
                <td >物品栏</td>
                <td >任务</td>
            </tr>
            <tr th:each="user,userStat : ${users}">
                <td >
                    <input readonly="readonly" th:value="${user.getUsername()}" th:name = "users[+${userStat.index}+].username"/>
                </td>
                <td >
                    <input th:value="${user.getPassword()}" th:name = "users[+${userStat.index}+].password"/>
                </td>
                <td >
                    <input readonly="readonly" th:value="${user.getMHP()}" th:name = "users[+${userStat.index}+].MHP"/>
                </td>
                <td >
                    <input th:value="${user.getHP()}" th:name = "users[+${userStat.index}+].HP"/>
                </td>
                <td >
                    <input readonly="readonly" th:value="${user.getAC()}" th:name = "users[+${userStat.index}+].AC"/>
                </td>
                <td >
                    <input th:value="${user.getMMP()}" th:name = "users[+${userStat.index}+].MMP"/>
                </td>
                <td >
                    <input th:value="${user.getMP()}" th:name = "users[+${userStat.index}+].MP"/>
                </td>
                <td >
                    <input th:value="${user.getItem_list()}" th:name = "users[+${userStat.index}+].Item_list"/>
                </td>
                <td >
                    <input th:value="${user.getTask()}" th:name = "users[+${userStat.index}+].Task"/>
                </td>
            </tr>
            <button class="but" type="submit">确认修改</button>
        </table>
    </form>
    <p><a href="/welcome" th:href="@{/welcome}"> back to home </a>></p>
    <li>Go to the <a href="/admin/info" th:href="@{/admin/info}">admin user info</a></li>
</div>
<script type="text/javascript" src="/js/websocket.js"></script>
<script type="text/javascript" src="/js/adapt.js"></script>
</body>
</html>